package com.zhipu.balance.mobile.event.upgrade;

import com.raizlabs.android.dbflow.annotation.Migration;
import com.raizlabs.android.dbflow.sql.SQLiteType;
import com.raizlabs.android.dbflow.sql.migration.AlterTableMigration;
import com.zhipu.balance.mobile.DBManager;
import com.zhipu.balance.mobile.event.RecordDaMi;
import com.zhipu.balance.mobile.event.RecordDaMi_Table;
import com.zhipu.balance.mobile.event.RecordWheat_Table;

@Migration(version = 12, database = DBManager.class)
public class RecordDaMi1 extends AlterTableMigration<RecordDaMi> {


    public RecordDaMi1(Class<RecordDaMi> table) {
        super(table);
    }


    @Override
    public void onPreMigrate() {
        super.onPreMigrate();
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.deviceId.getNameAlias().name());



        addColumn(SQLiteType.TEXT, RecordDaMi_Table.insectBoredQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.insectBoredResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.mottledQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.mottledResult.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.moldWeight.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.moldResult.getNameAlias().name());
        //未熟粒、破损粒质量
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.immatureBrokenGrainQuality.getNameAlias().name());
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.immatureGrainResult.getNameAlias().name());
        //不完善糙米质量
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.incompleteBrownRiceQuality.getNameAlias().name());
        //出糙率-结果
        addColumn(SQLiteType.TEXT, RecordDaMi_Table.rougheningResults.getNameAlias().name());
    }
}
